package p270jp.pxv.android.viewholder;

import android.view.View;
import android.view.ViewGroup;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import java.util.List;
import p045be.IllustGridRecyclerAdapter;
import p134ei.AnalyticsScreenName;
import p184gi.FirebaseScreenNameVia;
import p270jp.pxv.android.R;
import p270jp.pxv.android.activity.CollectionActivity;
import p270jp.pxv.android.commonObjects.model.WorkType;
import p270jp.pxv.android.legacy.model.PixivIllust;
import p307l9.EdgeTreatment;
import p374nm.UserProfileContentsView;
import p451qm.GridItemDecoration;
import p547uh.View$OnClickListenerC6612y7;

/* renamed from: jp.pxv.android.viewholder.UserProfileIllustCollectionViewHolder */
/* loaded from: classes2.dex */
public class UserProfileIllustCollectionViewHolder extends RecyclerView.AbstractC0819y {
    private static final int COLUMN_NUM;
    private static final int ROW_NUM;
    private IllustGridRecyclerAdapter adapter;
    private UserProfileContentsView userProfileContentsView;

    private UserProfileIllustCollectionViewHolder(UserProfileContentsView t0Var) {
        super(t0Var);
        this.userProfileContentsView = t0Var;
        IllustGridRecyclerAdapter tVar = new IllustGridRecyclerAdapter(this.itemView.getContext(), 2, 3);
        this.adapter = tVar;
        tVar.f4910j = new FirebaseScreenNameVia(AnalyticsScreenName.USER_PROFILE, 9);
        t0Var.m3326a(new GridLayoutManager(this.itemView.getContext(), 3), new GridItemDecoration(this.itemView.getResources().getDimensionPixelSize(R.dimen.illust_item_divider_size), 3, 0), this.adapter);
    }

    public static UserProfileIllustCollectionViewHolder createViewHolderByParentView(ViewGroup viewGroup) {
        return new UserProfileIllustCollectionViewHolder(new UserProfileContentsView(viewGroup.getContext()));
    }

    public /* synthetic */ void lambda$onBindViewHolder$0(long j, View view) {
        this.itemView.getContext().startActivity(CollectionActivity.m4834e1(this.itemView.getContext(), j, WorkType.ILLUST_MANGA));
    }

    public void onBindViewHolder(long j, List<PixivIllust> list, String str) {
        EdgeTreatment.m3909i(list);
        this.userProfileContentsView.setTitleText(this.itemView.getContext().getString(R.string.user_profile_collection_illust_manga));
        this.userProfileContentsView.setReadMoreText(this.itemView.getContext().getString(R.string.collection_tag_all));
        this.userProfileContentsView.setReadMoreTextClickListener(new View$OnClickListenerC6612y7(this, j, 1));
        this.adapter.m10337r(list.subList(0, Math.min(6, list.size())), list, str);
        this.adapter.f3606a.m10780b();
        this.userProfileContentsView.m3325b(list, 2, 3);
    }
}
